package com.example;

//lambda表达式与匿名内部类
public class test {
    public static void main(String[] args) {
        zf demo1 = new zf(){
            @Override
            public int fun1(int a) {
                return a;
            }
        };
        System.out.println(demo1.fun1(100));
        zf demo = a->2*a;
        System.out.println(demo.fun1(1));
        System.out.println(get(e->2+e,1));
    }
    static int get(zf zf,int a){
        return zf.fun1(a);
    }
}
 interface zf{
    int fun1(int a);
}
